package com.wmh.baseservice.skd.pojo.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@ApiModel(value = "添加商品请求体")
public class AddGoodsReqVO implements Serializable {
    /**
     * 商品名称
     */
    @ApiModelProperty(value = "商品名称")
    @NotBlank(message = "未提交商品名称")
    private String name;

    /**
     * 商品描述
     */
    @ApiModelProperty(value = "商品描述")
    private String description;

    /**
     * 商品图片
     */
    @ApiModelProperty(value = "商品图片地址")
    @NotBlank(message = "未提交商品图片地址")
    private String imgUrl;

    /**
     * 视频
     */
    @ApiModelProperty(value = "视频地址")
    private String videoUrl;

    /**
     * 商品规格 json格式数组字符串
     * [
     *  {
     *   "describe": String(规格描述),
     *   "imgUrl": String(图片地址),
     *   "price": BigDecimal(价格),
     *   "inventory": Integer (库存 -1不限)
     *   }
     * ]
     */
    @ApiModelProperty(value = "商品规格")
    private String goodsSpec;

    /**
     * 价格
     */
    @ApiModelProperty(value = "价格")
    private BigDecimal price;

    /**
     * 划线价
     */
    @ApiModelProperty(value = "划线价")
    private BigDecimal crossedPrice;

    /**
     * 商品编码
     */
    @ApiModelProperty(value = "商品编码")
    private String goodsNo;

    /**
     * 标签id
     */
    @ApiModelProperty(value = "标签")
    private List<String> labels;

    /**
     * 分类id
     */
    @ApiModelProperty(value = "分类id")
    private Long categoryId;
}
